Field of the Invention
The present invention relates to a three dimensional shape measurement apparatus, a control method therefor, and a storage medium.
Description of the Related Art
Several three dimensional shape measurement methods used in three dimensional shape measurement apparatuses have been proposed. The passive scheme in which shape measurement is performed using a photographing apparatus alone without a projection apparatus, and the active scheme in which a projection apparatus and a photographing apparatus are used in combination have been known. In the active scheme, the three dimensional shape of a target object is measured from an image obtained by photographing the target object on which a specific projection pattern is projected. Since the target object has a three dimensional shape, the three dimensional shape measurement apparatus needs to satisfy the accuracy required for shape measurement in the depth direction as well.
Japanese Patent Laid-Open Nos. 11-118443 and 2007-85862 disclose examples of such an active three dimensional shape measurement apparatus. Japanese Patent Laid-Open No. 11-118443 discloses a technique of projecting a slit pattern onto a target object upon irradiation, and controlling a light source so that the integrated irradiation intensity distribution has a triangular wave shape, thereby performing three dimensional shape measurement using the principle of the phase shift method. Japanese Patent Laid-Open No. 2007-85862 discloses a technique of defocusing a projection pattern having a digital tone value to form a sine wave pattern, thereby performing three dimensional shape measurement using the principle of the phase shift method, as in Japanese Patent Laid-Open No. 11-118443.
Unfortunately, the three dimensional shape measurement apparatus described in Japanese Patent Laid-Open No. 11-118443 can hardly satisfy the required accuracy across the entire region, in the depth direction, of a target object placed on a measurement reference surface. Similarly, the three dimensional shape measurement apparatus described in Japanese Patent Laid-Open No. 2007-85862 can hardly satisfy the required accuracy across the entire region of the target object in the depth direction. This is because the contrast of an image obtained by photographing the target object lowers as the defocus from the focal plane of a photographing optical system becomes considerable, leading to degradation in accuracy of a three dimensional shape calculated from the image with poorer contrast.
More specifically, as in Japanese Patent Laid-Open No. 11-118443, when the focal plane of a photographing optical system is defined as a measurement reference surface, the contrast of an image obtained by photographing a target object placed on the measurement reference surface lowers in a direction away from the measurement reference surface, resulting in degradation in measurement accuracy. Therefore, the measurement accuracy of the target object on the measurement reference surface is considerably poor on the face of the target object closest to the photographing apparatus, thus making it difficult to satisfy the required accuracy across the entire region in the depth direction.
Also, as in Japanese Patent Laid-Open No. 2007-85862, when the focal plane of a projection pattern falls outside a region where a target object is present, the contrast of the projection pattern lowers on the surface of the target object from the face of the target object closer to the focal plane of the projection pattern to the face of the target object farther from the focal plane of the projection pattern. Accordingly, the contrast of the photographed image lowers, and the measurement accuracy degrades, thus making it difficult to satisfy the required accuracy across the entire region in the depth direction, as in Japanese Patent Laid-Open No. 11-118443.